/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package entity;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Temporal;

/**
 *
 * @author AdminNUS
 */
@Entity
public class AdvertisementStatistics implements Serializable {

    private static long serialVersionUID = 1L;

    /**
     * @return the serialVersionUID
     */
    public static long getSerialVersionUID() {
        return serialVersionUID;
    }

    /**
     * @param aSerialVersionUID the serialVersionUID to set
     */
    public static void setSerialVersionUID(long aSerialVersionUID) {
        serialVersionUID = aSerialVersionUID;
    }
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    private Long id;
    private Integer noOfClicks;
    private Integer noOfImpressions;
    private Double dailyCharges;
    private boolean isCompute;
    @Temporal(javax.persistence.TemporalType.TIMESTAMP)
    private Date startDate;
    @Temporal(javax.persistence.TemporalType.TIMESTAMP)
    private Date endDate;

    /**
     * @return the id
     */
    public Long getId() {
        return id;
    }

    /**
     * @param id the id to set
     */
    public void setId(Long id) {
        this.id = id;
    }

    /**
     * @return the noOfClicks
     */
    public Integer getNoOfClicks() {
        return noOfClicks;
    }

    /**
     * @param noOfClicks the noOfClicks to set
     */
    public void setNoOfClicks(Integer noOfClicks) {
        this.noOfClicks = noOfClicks;
    }

    /**
     * @return the noOfImpressions
     */
    public Integer getNoOfImpressions() {
        return noOfImpressions;
    }

    /**
     * @param noOfImpressions the noOfImpressions to set
     */
    public void setNoOfImpressions(Integer noOfImpressions) {
        this.noOfImpressions = noOfImpressions;
    }

    /**
     * @return the dailyCharges
     */
    public Double getDailyCharges() {
        return dailyCharges;
    }

    /**
     * @param dailyCharges the dailyCharges to set
     */
    public void setDailyCharges(Double dailyCharges) {
        this.dailyCharges = dailyCharges;
    }

    /**
     * @return the isClose
     */
    public boolean isIsCompute() {
        return isCompute;
    }

    /**
     * @param isClose the isClose to set
     */
    public void setIsCompute(boolean isCompute) {
        this.isCompute = isCompute;
    }

    /**
     * @return the startDate
     */
    public Date getStartDate() {
        return startDate;
    }

    /**
     * @param startDate the startDate to set
     */
    public void setStartDate(Date startDate) {
        this.startDate = startDate;
    }

    /**
     * @return the endDate
     */
    public Date getEndDate() {
        return endDate;
    }

    /**
     * @param endDate the endDate to set
     */
    public void setEndDate(Date endDate) {
        this.endDate = endDate;
    }
    
    /**
     * @return Increase Click Count By 1
     */
    public void incrementClickCount() {
        this.noOfClicks++;
    }

    /**
     * @return Increase Impression Count By 1
     */
    public void incrementImpressionCount() {
        this.noOfImpressions++;
    }

    
}
